package com.medicalproject.controller;

import com.medical.pojo.State;
import com.medical.vo.Rmed;
import com.medicalproject.service.StateService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("state")
public class StateController {
    @Resource
    private StateService stateService;

    @RequestMapping("add")
    public Rmed add(@RequestBody State state){
        return Rmed.suceessData(stateService.add(state));
    }

    @RequestMapping("handleadd")
    public Rmed handleadd(@RequestBody State state){
        return Rmed.suceessData(stateService.handleadd(state));
    }

}
